import request from '../utils/request'

export interface YsTokenResponse {
  code: number;
  message: string;
  data: {
    result: null;
    data: {
      accessToken: string;
      expireTime: number;
    };
    page: null;
    code: string;
    msg: string;
    meta: null;
  };
}

export const getYsToken = () => {
  console.log('调用萤石云token接口...');
  return request<YsTokenResponse>({
    url: 'ys/token',
    method: 'post',
    data: {
      accountId: '1ca7f0ab24ba41b291346347ec30140e'
    }
  });
} 